#pragma once
extern "C"
{
#include "lua.h"
#include "lualib.h"
#include "lauxlib.h"
}

#include <string>

#include <luabind/luabind.hpp>
#include <luabind/object.hpp>
#include <luabind/class.hpp>

#include "EnermyObj.h"
#include "BossObj.h"


struct EnermyInfo 
{	
	std::string enermy;
	std::string bullet;
	float x,y,time;
	int hp,bulletType;
	std::string control;
};

struct BossInfo 
{
	std::string BossName;
	std::string Bullet1,Bullet2,Bullet3;
	float x,y,time;
	int hp;
	std::string control;
};

class ScriptEngine {
public:
	static void Init();
	static void Release();
	static void Bind_All(lua_State* L);
	static EnermyInfo Controller(const char* filename,float time);
	static bool Compute(const char* funcname,float stime,float ntime,EnermyObj *obj);
	static bool Compute(const char* funcname,float stime,float ntime,BossObj *obj);
	static void CallBulletFunc(const char* funcname,BulletInfo *obj,float playerX,float playerY,float ntime);
	static BossInfo BossController(float time);
private:
	static lua_State* L;
};